From: Jasper St. Pierre Date: Wed, 22 Aug 2012 10:05:21 +0000 (-0300) Subject: dash: Fix some issues with the label API X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~6069 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=983535224e2f54e189974cd5c54e0af1301fe73d;p=gnome-shell.git dash: Fix some issues with the label API Be able to call setLabelText more than once. https://bugzilla.gnome.org/show_bug.cgi?id=682445 --- diff --git a/js/ui/dash.js b/js/ui/dash.js index bc98ae323..47f6f4d39 100644 --- a/js/ui/dash.js +++ b/js/ui/dash.js @@ -124,15 +124,19 @@ const DashItemContainer = new Lang.Class({ }, setLabelText: function(text) { - if (this.label == null) + if (this.label == null) { this.label = new St.Label({ style_class: 'dash-label'}); + Main.layoutManager.addChrome(this.label); + this.label.hide(); + } this.label.set_text(text); - Main.layoutManager.addChrome(this.label); - this.label.hide(); }, hideLabel: function () { + if (this.label == null) + return; + Tweener.addTween(this.label, { opacity: 0, time: DASH_ITEM_LABEL_HIDE_TIME,